<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mytable/jrtable/Ok3w_Class.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mytable/jrtable/Ok3w_Class.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'ok3w_class_id',
                footer: "Foots",
                cnName: '上传分类',
                name: 'jrtable/Ok3w_Class',
                url: "/Ok3w_Class/",
                sortName: "SortName"
            });
            const editFormFields = ref({"SortName":"","ParentID":[],"SortPath":"","OrderID":"","IsPic":"","PageSize":"","IsNav":"","gotoURL":""});
            const editFormOptions = ref([[{"title":"分类名称","required":true,"field":"SortName"}],
                              [{"dataKey":"下载分类","data":[],"title":"父分类","field":"ParentID","type":"cascader"},
                               {"title":"目录完整路径","required":true,"field":"SortPath"}],
                              [{"title":"图片列表","field":"IsPic","type":"number"},
                               {"title":"目录展示顺序","required":true,"field":"OrderID","type":"number"}],
                              [{"title":"每个目录展示条数","field":"PageSize","type":"number"},
                               {"title":"导航显示","field":"IsNav","type":"number"}],
                              [{"title":"外部链接地址","field":"gotoURL"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'ok3w_class_id',title:'常用软件平台-目录id',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'id',title:'分类',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'SortName',title:'分类名称',type:'string',link:true,width:110,require:true,align:'left',sort:true},
                       {field:'ParentID',title:'父分类',type:'guid',bind:{ key:'下载分类',data:[]},width:110,align:'left'},
                       {field:'SortPath',title:'目录完整路径',type:'string',width:220,require:true,align:'left'},
                       {field:'OrderID',title:'目录展示顺序',type:'int',width:110,require:true,align:'left'},
                       {field:'IsPic',title:'图片列表',type:'int',width:110,align:'left'},
                       {field:'PageSize',title:'每个目录展示条数',type:'int',width:110,align:'left'},
                       {field:'IsNav',title:'导航显示',type:'int',width:110,align:'left'},
                       {field:'gotoURL',title:'外部链接地址',type:'string',width:220,align:'left'},
                       {field:'CreateID',title:'创建人id',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人名称',type:'string',width:130,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人id',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人名称',type:'string',width:130,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
